package com.scujcc.springboot_mybatis.Dao;

import com.scujcc.springboot_mybatis.Entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface BookDao{
    @Select("SELECT * FROM books WHERE id=#{id}")
    Book getById(Integer id);
    @Select("SELECT * FROM books")
    List<Book> getAll();

}
